package com.mycompany.app.testsuite.jbpm;

import org.jbpm.JbpmConfiguration;
import org.jbpm.JbpmContext;

import com.mycompany.app.hr.workflow.WorkFlowType;
import com.mycompany.app.testsuite.BaseTestUtils;
import com.mycompany.app.util.SpringUtils;

public class JbpmTest extends BaseTestUtils {

    public static void main(String[] args) {

        JbpmConfiguration jbpmConfiguration = (JbpmConfiguration) SpringUtils
                .getApplicationContext().getBean("jbpmConfiguration");
        jbpmConfiguration.hashCode();
        System.out.println(jbpmConfiguration.createJbpmContext().getConnection());
        
        JbpmContext context=jbpmConfiguration.createJbpmContext();
        
        System.out.println(WorkFlowType.leave.name()+"actroID "+context.getActorId());
        context.newProcessInstance(WorkFlowType.leave.name());
        
        context.close();
    }

}
